# -*- encoding: utf-8 -*-
"""
@File    :   keyword_extraction.py
@Time    :   2020/07/13 16:34:26
@Author  :   Song Zewen 
@Version :   1.0
@Contact :   stg1205@163.com
@License :   (C)Copyright 2020-2021, Liugroup-NLPR-CASIA
@Desc    :   关键词提取模块
"""


from jieba.analyse import *


# jieba分词
def keyword_extractor(content):
    # for keyword, weight in extract_tags(content, topK=10, withWeight=True):
    #     print('%s %s' % (keyword, weight))

    for keyword in extract_tags(content, topK=10):
        print(keyword)

    # text = textrank(content, topK=10, withWeight=True)